-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2513: Update logging effect in automation #3437
Conversation
1. Print the executed commands and exit code when a test is failed. 2. Print the failed commands' output. 3. Hide msrest, vcr, or any other logger.
Codecov Report
@@ Coverage Diff @@
## master #3437 +/- ##
==========================================
+ Coverage 70.76% 70.78% +0.01%
==========================================
Files 394 394
Lines 25586 25582 -4
Branches 3900 3898 -2
==========================================
+ Hits 18106 18107 +1
+ Misses 6333 6330 -3
+ Partials 1147 1145 -2
Continue to review full report at Codecov.
|
|
||
|
||
class IntegrationTestBase(unittest.TestCase): | ||
def __init__(self, method_name): | ||
super(IntegrationTestBase, self).__init__(method_name) | ||
self.diagnose = os.environ.get(ENV_TEST_DIAGNOSE, None) == 'True' | ||
|
||
def cmd(self, command, checks=None, expect_failure=False): | ||
if self.diagnose: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this being removed? I use this extensively during local troubleshooting. Or is this now accomplished another way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command will print in logging whenever the test fails. You don't need to set diagnostics anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's give it a shot :)
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
Command Guidelines
(see Authoring Command Modules)